<header>
    <title>角色添加</title>
</header>
{include file="public/header" /}
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">

            <form class="layui-form" action="add" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">输入框</label>
                    <div class="layui-input-block">
                        <input style="width:140px;" type="text" name="role_name" required  lay-verify="required"  placeholder="请输入角色名称" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">权限分配</label>
                    <div class="layui-input-block">
                        {foreach $list as $key=>$vo }
                        <input type="checkbox" name="node_id[{$vo.id}]" title="{$vo.node_name}">
                        {/foreach}
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>

            <script>
                //Demo
                layui.use('form', function(){
                    var form = layui.form;

                    //监听提交
                    form.on('submit(formDemo)', function(data){

                    });
                });
            </script>
            {include file="public/footer" /}